
const apiStatus = require('../../apiStatus');
const appService = require('./appService');

function setup(app, appRouter){
    appRouter.get('/api/app/getConfig', async(ctx,next) => {
        let appId = ctx.appInfo.id;
        let appInfo = await appService.getConfig(appId);
        ctx.apiBody = appInfo;
        next();
    });

    appRouter.get('/api/sys/getMenus', async(ctx,next) =>{
        let appId = ctx.appInfo.id;
        let menus = await appService.getCMSMenus();
        ctx.apiBody = menus;
        next();
    });
}

module.exports = setup;
